using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class DownloadVoiceRequest : GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>
		{
			private bool resultIsReadOnly;
			private DownloadVoiceRequest result;
			protected override DownloadVoiceRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override DownloadVoiceRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override DownloadVoiceRequest DefaultInstanceForType
			{
				get
				{
					return DownloadVoiceRequest.DefaultInstance;
				}
			}
			public uint MsgId
			{
				get
				{
					return this.result.MsgId;
				}
				set
				{
					this.SetMsgId(value);
				}
			}
			public uint Offset
			{
				get
				{
					return this.result.Offset;
				}
				set
				{
					this.SetOffset(value);
				}
			}
			public uint Length
			{
				get
				{
					return this.result.Length;
				}
				set
				{
					this.SetLength(value);
				}
			}
			public string ClientMsgId
			{
				get
				{
					return this.result.ClientMsgId;
				}
				set
				{
					this.SetClientMsgId(value);
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public Builder()
			{
				this.result = DownloadVoiceRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(DownloadVoiceRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private DownloadVoiceRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					DownloadVoiceRequest other = this.result;
					this.result = new DownloadVoiceRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override DownloadVoiceRequest.Builder Clear()
			{
				this.result = DownloadVoiceRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override DownloadVoiceRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new DownloadVoiceRequest.Builder(this.result);
				}
				return new DownloadVoiceRequest.Builder().MergeFrom(this.result);
			}
			public override DownloadVoiceRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override DownloadVoiceRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is DownloadVoiceRequest)
				{
					return this.MergeFrom((DownloadVoiceRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override DownloadVoiceRequest.Builder MergeFrom(DownloadVoiceRequest other)
			{
				return this;
			}
			public override DownloadVoiceRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override DownloadVoiceRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(DownloadVoiceRequest._downloadVoiceRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = DownloadVoiceRequest._downloadVoiceRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasMsgId = input.ReadUInt32(ref this.result.msgId_);
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasOffset = input.ReadUInt32(ref this.result.offset_);
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasLength = input.ReadUInt32(ref this.result.length_);
							continue;
						}
						if (num3 == 34u)
						{
							this.result.hasClientMsgId = input.ReadString(ref this.result.clientMsgId_);
							continue;
						}
						if (num3 == 42u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public DownloadVoiceRequest.Builder SetMsgId(uint value)
			{
				this.PrepareBuilder();
				this.result.hasMsgId = true;
				this.result.msgId_ = value;
				return this;
			}
			public DownloadVoiceRequest.Builder ClearMsgId()
			{
				this.PrepareBuilder();
				this.result.hasMsgId = false;
				this.result.msgId_ = 0u;
				return this;
			}
			public DownloadVoiceRequest.Builder SetOffset(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOffset = true;
				this.result.offset_ = value;
				return this;
			}
			public DownloadVoiceRequest.Builder ClearOffset()
			{
				this.PrepareBuilder();
				this.result.hasOffset = false;
				this.result.offset_ = 0u;
				return this;
			}
			public DownloadVoiceRequest.Builder SetLength(uint value)
			{
				this.PrepareBuilder();
				this.result.hasLength = true;
				this.result.length_ = value;
				return this;
			}
			public DownloadVoiceRequest.Builder ClearLength()
			{
				this.PrepareBuilder();
				this.result.hasLength = false;
				this.result.length_ = 0u;
				return this;
			}
			public DownloadVoiceRequest.Builder SetClientMsgId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasClientMsgId = true;
				this.result.clientMsgId_ = value;
				return this;
			}
			public DownloadVoiceRequest.Builder ClearClientMsgId()
			{
				this.PrepareBuilder();
				this.result.hasClientMsgId = false;
				this.result.clientMsgId_ = "";
				return this;
			}
			public DownloadVoiceRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public DownloadVoiceRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public DownloadVoiceRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public DownloadVoiceRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
		}
		public const int MsgIdFieldNumber = 1;
		public const int OffsetFieldNumber = 2;
		public const int LengthFieldNumber = 3;
		public const int ClientMsgIdFieldNumber = 4;
		public const int BaseRequestFieldNumber = 5;
		private static readonly DownloadVoiceRequest defaultInstance;
		private static readonly string[] _downloadVoiceRequestFieldNames;
		private static readonly uint[] _downloadVoiceRequestFieldTags;
		private bool hasMsgId;
		private uint msgId_;
		private bool hasOffset;
		private uint offset_;
		private bool hasLength;
		private uint length_;
		private bool hasClientMsgId;
		private string clientMsgId_ = "";
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private int memoizedSerializedSize = -1;
		public static DownloadVoiceRequest DefaultInstance
		{
			get
			{
				return DownloadVoiceRequest.defaultInstance;
			}
		}
		public override DownloadVoiceRequest DefaultInstanceForType
		{
			get
			{
				return DownloadVoiceRequest.DefaultInstance;
			}
		}
		protected override DownloadVoiceRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint MsgId
		{
			get
			{
				return this.msgId_;
			}
		}
		public uint Offset
		{
			get
			{
				return this.offset_;
			}
		}
		public uint Length
		{
			get
			{
				return this.length_;
			}
		}
		public string ClientMsgId
		{
			get
			{
				return this.clientMsgId_;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasMsgId && this.hasOffset && this.hasLength && this.hasBaseRequest && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasMsgId)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.MsgId);
				}
				if (this.hasOffset)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Offset);
				}
				if (this.hasLength)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Length);
				}
				if (this.hasClientMsgId)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.ClientMsgId);
				}
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(5, this.BaseRequest);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private DownloadVoiceRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] downloadVoiceRequestFieldNames = DownloadVoiceRequest._downloadVoiceRequestFieldNames;
			if (this.hasMsgId)
			{
				output.WriteUInt32(1, downloadVoiceRequestFieldNames[3], this.MsgId);
			}
			if (this.hasOffset)
			{
				output.WriteUInt32(2, downloadVoiceRequestFieldNames[4], this.Offset);
			}
			if (this.hasLength)
			{
				output.WriteUInt32(3, downloadVoiceRequestFieldNames[2], this.Length);
			}
			if (this.hasClientMsgId)
			{
				output.WriteString(4, downloadVoiceRequestFieldNames[1], this.ClientMsgId);
			}
			if (this.hasBaseRequest)
			{
				output.WriteMessage(5, downloadVoiceRequestFieldNames[0], this.BaseRequest);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasMsgId)
			{
				num ^= this.msgId_.GetHashCode();
			}
			if (this.hasOffset)
			{
				num ^= this.offset_.GetHashCode();
			}
			if (this.hasLength)
			{
				num ^= this.length_.GetHashCode();
			}
			if (this.hasClientMsgId)
			{
				num ^= this.clientMsgId_.GetHashCode();
			}
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			DownloadVoiceRequest downloadVoiceRequest = value as DownloadVoiceRequest;
			return downloadVoiceRequest != null && (this.hasMsgId == downloadVoiceRequest.hasMsgId && (!this.hasMsgId || this.msgId_.Equals(downloadVoiceRequest.msgId_))) && (this.hasOffset == downloadVoiceRequest.hasOffset && (!this.hasOffset || this.offset_.Equals(downloadVoiceRequest.offset_))) && (this.hasLength == downloadVoiceRequest.hasLength && (!this.hasLength || this.length_.Equals(downloadVoiceRequest.length_))) && (this.hasClientMsgId == downloadVoiceRequest.hasClientMsgId && (!this.hasClientMsgId || this.clientMsgId_.Equals(downloadVoiceRequest.clientMsgId_))) && (this.hasBaseRequest == downloadVoiceRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(downloadVoiceRequest.baseRequest_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>.PrintField("MsgId", this.hasMsgId, this.msgId_, writer);
			GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>.PrintField("Offset", this.hasOffset, this.offset_, writer);
			GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>.PrintField("Length", this.hasLength, this.length_, writer);
			GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>.PrintField("ClientMsgId", this.hasClientMsgId, this.clientMsgId_, writer);
			GeneratedMessageLite<DownloadVoiceRequest, DownloadVoiceRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
		}
		public static DownloadVoiceRequest ParseFrom(byte[] data)
		{
			return DownloadVoiceRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private DownloadVoiceRequest MakeReadOnly()
		{
			return this;
		}
		public static DownloadVoiceRequest.Builder CreateBuilder()
		{
			return new DownloadVoiceRequest.Builder();
		}
		public override DownloadVoiceRequest.Builder ToBuilder()
		{
			return DownloadVoiceRequest.CreateBuilder(this);
		}
		public override DownloadVoiceRequest.Builder CreateBuilderForType()
		{
			return new DownloadVoiceRequest.Builder();
		}
		public static DownloadVoiceRequest.Builder CreateBuilder(DownloadVoiceRequest prototype)
		{
			return new DownloadVoiceRequest.Builder(prototype);
		}
		static DownloadVoiceRequest()
		{
			DownloadVoiceRequest.defaultInstance = new DownloadVoiceRequest().MakeReadOnly();
			DownloadVoiceRequest._downloadVoiceRequestFieldNames = new string[]
			{
				"BaseRequest",
				"ClientMsgId",
				"Length",
				"MsgId",
				"Offset"
			};
			DownloadVoiceRequest._downloadVoiceRequestFieldTags = new uint[]
			{
				42u,
				34u,
				24u,
				8u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.DownloadVoiceRequest.Descriptor, null);
		}
	}
}
